libxl: Add a gc to libxl_get_cpu_topology
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 28 Jun 2012 17:43:25 +0000 (18:43 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 28 Jun 2012 17:43:25 +0000 (18:43 +0100)
commit5e07d8709811cd22f7cebd68f00c9d0774b323c4
tree46d98886a8aefbfd1e65cf46cfa6a56e8c079646
parent9cf80c44793b84e2e7fdd0f10e8ce15ec2c43126
libxl: Add a gc to libxl_get_cpu_topology

In the next-but-one patch we are going to change the definition of
NOGC to require a local variable libxl__gc *gc.

libxl_get_cpu_topology doesn't have one but does use NOGC.
Fix this by:
 - introducing an `out' label
 - replacing the only call to `return' with a suitable assignment
   to ret and a `goto out'.
 - adding uses of GC_INIT and GC_FREE.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.c